#include <QApplication>

#include "DGVTable.h"

int main(int argc, char *argv[])
{
    QApplication app(argc,argv);
    DGVTable Table;

    QString filename = QFileDialog::getOpenFileName(&Table,
                           QObject::tr("Select File to Open"),
                           ".",
                           QObject::tr("CSV Files (*.csv)"));

    if(!Table.loadCSV(filename))
    {
        cerr << "Error Loading file" << endl;
        return EXIT_FAILURE;
    }

    Table.resizeColumnsToContents();
    Table.adjustSize();
    Table.show();

	return app.exec();
}
